package com.mail.server.controller;


import com.mail.dubbo.api.SmsCouponHistoryApi;
import com.mail.server.common.R;
import com.mail.server.service.SmsCouponHistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 优惠券使用、领取历史表 前端控制器
 * </p>
 *
 * @author WJZ
 * @since 2022-06-20
 */
@RestController
@RequestMapping("/couponHistory")
public class SmsCouponHistoryController {
    @Autowired
    private SmsCouponHistoryService service;
    @GetMapping("list")
    public R list(@RequestParam(value = "couponId",required = false) Long couponId
            , @RequestParam(value = "pageNum",required = false)Long pageNum
            , @RequestParam(value = "pageSize",required = false)Long pageSize
            , @RequestParam(value = "useStatus",required = false)Integer type,
                  @RequestParam(value = "orderSn",required = false)String orderSn){
        return service.list(couponId,pageNum,pageSize,type,orderSn);
    }
}
